'use strict';
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var __importDefault =
    (this && this.__importDefault) ||
    function (mod) {
        return mod && mod.__esModule
            ? mod
            : {  
                  default: mod
              };
    };

// exports.__esModule = true;

var request_1 = __importDefault(require('./../utils/request.js'));
var request = new request_1['default']();
var globalData_1 = require('../globalData');
var marketingRequest = new request_1['default']({
    ApiUrl: globalData_1['default'].URL
});
/***** 公共部分******/
// 获取登录凭证

exports.getJsCode2session = function (params) {
    return request.postRequest({
        url: 'getJsCode2session',
        data: params
    });
}; // 注册

exports.login = function (params) {
    return request.postRequest({
        url: 'login',
        data: params
    });
}; // 登录

exports.loginCheck = function (params) {
    return request.postRequest({
        url: 'loginCheck',
        data: params
    });
}; // 登出

exports.logout = function () {
    return request.postRequest({
        url: 'logout',
        data: {
            type: 3
        }
    });
}; // 获取Token


exports.getIdCodeApp = function (params) {
    return request.postRequest({
        url: 'getIdCode',
        data: params
    });
}; // APP获取验证码
exports.getCode = function (params) {
    return request.postRequest({
        url: 'getCode',
        data: params
    });
}; // 获取短信验证码：0iosApp，1安卓app，3小程序，5H5
exports.checkVerifyCode = function (params) {
    return request.getRequest({
        url: 'checkVerifyCode',
        data: params
    });
}; // 验证图片验证码
exports.registerOrLogin = function (params) {
    return request.postRequest({
        url: 'registerOrLogin',
        data: params
    });
}; // H5|APP登录、注册--验证码
exports.loginByPassword = function (params) {
    return request.postRequest({
        url: 'loginByPassword',
        data: params
    });
}; // H5|APP登录、注册--密码
exports.setFirstPassword = function (params) {
    return request.postRequest({
        url: 'setFirstPassword',
        data: params
    });
}; // 首次登录设置密码
exports.setUpPassword = function (params) {
    return request.postRequest({
        url: 'setUpPassword',
        data: params
    });
}; // 修改密码
exports.AppH5logout = function (params) {
    return request.postRequest({
        url: 'AppH5logout',
        data: params
    });
}; // 登出

exports.loginApp = function (params) {
    return request.postRequest({
        url: 'loginApp',
        data: params
    });
}; // APP登录

exports.registerApp = function (params) {
    return request.postRequest({
        url: 'registerApp',
        data: params
    });
}; // APP注册

exports.getToken = function (params) {
    return request.postRequest({
        url: 'getToken',
        data: params
    });
}; // App获取token

exports.city = function (params) {
    return request.getRequest({
        url: 'getStationArea',
        data: params
    });
}; //获取热门城市

exports.getPopularCity = function () {
    return request.getRequest({
        url: 'getPopularCity'
    });
};

exports.getPopularCityNew = function () {
    return request.postRequest({
        url: 'getPopularCityNew',
		header: 'form'
    });
}; //获取热门城市 2022/12/01

exports.getUserType = function (params) {
    return request.getRequest({
        url: 'getUserType',
        data: params
    });
}; // 获取用户身份类型

exports.getNowSwitchPattern = function (params) {
    return request.postRequest({
        url: 'style/getNowSwitchPattern',
		data: params,
		header: 'form'
    });
}; // 获取小程序配置的模式

/***** 首页部分******/
//轮播图

exports.info = function (params) {
    return request.getRequest({
        url: 'queryDynamicsActivity',
        data: params
    });
}; //广告个数

exports.getActivity = function (params) {
    return request.getRequest({
        url: 'getActivity',
        data: params
    });
}; //公告

exports.queryNewMessage = function (params) {
    return request.postRequest({
        url: 'message/queryNewMessage',
        data: params
    });
}; //获取商家样式配置

exports.getStyleConfig = function (params) {
    return request.getRequest({
        url: 'getStyleConfig' + '?sellerId=' + params
    });
}; // 站点列表--- 未登录

exports.noLoginStation = function (params) {
    return request.postRequest({
        url: 'indexStationNoAuth',
        data: params
    });
}; // 站点列表--- 已登录

exports.station = function (params) {
    return request.postRequest({
        url: 'indexStation',
        data: params
    });
}; // 弹窗广告

exports.indexStationNew = function (params) {
    return request.postRequest({
        url: 'indexStationNew',
        data: params
    });
}; // 站点列表-首页、地图找桩、站点列表共用

exports.getStationDetailByIdNew = function (params) {
    return request.postRequest({
        url: 'getStationDetailByIdNew',
        data: params
    });
}; 
// 未登录情况请求的站点详情接口
exports.getStationDetailByIdNotAuth = function (params) {
    return request.postRequest({
        url: 'getStationDetailByIdNotAuth',
        data: params
    });
}; 

// 站点详情-地图找桩

exports.getAdvertisingPopups = function (params) {
    return request.getRequest({
        url: 'getMessage',
        data: params,
        header: 'form'
    });
}; // 消息中心列表

exports.messagePage = function (params) {
    return request.postRequest({
        url: 'message/pages',
        data: params
    });
}; // 消息中心公告详情

exports.getMessageById = function (params) {
    return request.getRequest({
        url: 'message/getMessageById',
        data: params
    });
}; // 消息中心列表是否已读

exports.messageRead = function (params) {
    return request.postRequest({
        url: 'message/read',
        data: params
    });
}; // 首页消息是否已读

exports.isRread = function (params) {
    return request.postRequest({
        url: 'message/isRead',
        data: params
    });
}; //站点搜索

exports.getStationPage = function (params) {
    return request.postRequest({
        url: 'stationPage/getStationPage',
        data: params
    });
}; //获取未结算订单数

exports.getMyNotPayBillNumber = function (params) {
    return request.postRequest({
        url: 'getMyNotPayBillNumber',
        data: params
    });
}; //查询正在充电订单

exports.chargeInfos = function () {
    return request.postRequest({
        url: 'chargeInfos'
    });
};
// 充电中列表
exports.pageChargeServiceMonitor = function (params) {
    return request.postRequest({
        url: 'pageChargeServiceMonitor',
        data: params
    });
};
// 活动弹窗

exports.listPopUp = function () {
    return request.postRequest({
        url: 'popUp/listPopUp'
    });
}; // 活动弹窗已读

exports.readPopUp = function (params) {
    return request.postRequest({
        url: 'popUp/readPopUp',
        data: params
    });
}; // 公告弹窗已读

exports.updateMessageToHaveRead = function (params) {
    return request.postRequest({
        url: 'message/updateMessageToHaveRead' + '/' + params
    });
};

exports.getMessageByNewCoupon = function (params) {
    return request.postRequest({
        url: 'message/getMessageByNewCoupon',
        data: params,
		header: 'form'
    }); // 查看新优惠券到账
};

exports.pageChargeServiceMonitorNew = function (params) {
    return request.postRequest({
        url: 'pageChargeServiceMonitorNew',
        data: params,
    }); // 充电中列表
};
/***** 站点、终端******/
// 站点详情

exports.stationDetail = function (params) {
    return request.postRequest({
        url: 'getStationDetailById',
        data: params
    });
}; // 站点详情(查询枪最低价格信息)

exports.getStationGunPriceInfo = function (params) {
    return request.postRequest({
        url: 'getStationGunPriceInfo/' + params
    });
}; // 站点详情价格详情枪价格列表

exports.getStationGunPriceDetail = function (params) {
return request.postRequest({
	url: 'getStationGunPriceDetail/' + params
});
}; // 根据区域名获取区域

exports.getStationGunDetails = function (params) {
	return request.postRequest({
		url: 'getStationGunDetails/' + params
	});
}; // 获取枪详情数据

//获取活动小红点
exports.getNew = function () {
	return request.postRequest({
		url: 'activityChangeMobile/getNew'
	});
};

exports.getStationGunState = function (params) {
	return request.postRequest({
		url: 'getStationGunState/' + params.stationId+'?dataType='+params.dataType
	});
}; // 获取站点枪状态

exports.getStationGunList = function (params) {
	return request.postRequest({
		url: 'getStationGunList/' + + params.stationId+'?dataType='+params.dataType
	});
}; // 获取站点详情 枪数据

exports.citareaListByNamey = function (params) {
    return request.getRequest({
        url: 'stationPage/areaListByName',
        data: params
    });
}; // 根据上级id获取区域列表

exports.getAreaList = function (params) {
    return request.getRequest({
        url: 'stationPage/areaList',
        data: params
    });
}; // 获取用户偏好

exports.getMemberQueryPreference = function (params) {
    return request.postRequest({
        url: 'stationPage/preference/getMemberQueryPreference',
        data: params
    });
}; //收藏站点

exports.collectStation = function (params) {
    return request.postRequest({
        url: 'collect/addCollectStation/' + params
    });
}; //取消收藏站点

exports.cancelCollectStation = function (params) {
    return request.postRequest({
        url: 'collect/cancelCollectStation/' + params
    });
};
exports.changeUser = function (params) {
    return request.postRequest({
        url: 'changeUser?changeType='+params.changeType,
	      data:params
    });
};
exports.getPattern = function (params) {
    return request.postRequest({
        url: 'style/getPattern',
		data: params,
		header: 'form'
    });
}; // 是否有活动模式

exports.getIconMap = function (params) {
    return request.getRequest({
        url: 'style/getIconMap',
		data: params
    });
}; // 获取icon路径map返回

/***** 我的部分******/
// 个人信息

exports.getMemberInfo = function () {
    return request.postRequest({
        url: 'getMemberInfo'
    });
}; // 我的车辆列表

exports.getVehicleList = function () {
    return request.postRequest({
        url: 'getVehicleList'
    });
}; // 查询车辆性质列表

exports.vehicleNatureAll = function () {
    return request.postRequest({
        url: 'vehicleNatureAll'
    });
}; // 查询车辆品牌列表

exports.vehicleBrand = function () {
    return request.postRequest({
        url: 'vehicleBrand'
    });
}; // 车辆品牌型号反馈

exports.addBrandAndType = function (params) {
    return request.postRequest({
        url: 'feedback/addBrandAndType',
        data: params
    });
}; //会员车辆-新增

exports.addVehicle = function (params) {
    return request.postRequest({
        url: 'addVehicle',
        data: params
    });
}; //会员车辆-修改

exports.updateVehicleInfo = function (params) {
    return request.postRequest({
        url: 'updateVehicleInfo',
        data: params
    });
}; //会员车辆-修改默认车辆

exports.updateDefaultVehicle = function (params) {
    return request.postRequest({
        url: 'updateDefaultVehicle',
        data: params,
        header: 'form'
    });
}; //会员车辆-删除

exports.delVehicleInfo = function (params) {
    return request.postRequest({
        url: 'delVehicleInfo',
        data: params,
        header: 'form'
    });
}; //获取账户和奖励金余额（充值页面：个人账号有奖励金余额，车队账户无）

exports.getAccountInfo = function (params) {
    return request.postRequest({
        url: 'getAccountInfo',
        data: params
    });
}; // 充值金额

exports.unifiedOrder = function (params) {
    return request.postRequest({
        url: 'unifiedOrder',
        data: params
    });
}; // 充值查询

exports.orderQuery = function (params) {
    return request.postRequest({
        url: 'orderQuery',
        data: params
    });
}; // 收支记录

exports.disposableStartCharge = function (params) {
    return request.postRequest({
        url: 'charge/disposableStartCharge',
        data: params
    });
}; 
// 启动充电-充完即退-微信支付前校验（/微信支付成功后鉴权）
exports.disposableUnifiedOrders = function (params) {
    return request.postRequest({
        url: 'disposable/unifiedOrders',
        data: params
    });
}; 
// 启动充电-充完即退-微信预下单
exports.disposableOrderResultQuery = function (params) {
    return request.postRequest({
        url: 'disposable/orderResultQuery',
        data: params
    });
}; // 启动充电-充完即退-微信查询支付结果

exports.aliOrderResultQuery = function (params) {
    return request.postRequest({
        url: 'ali/orderResultQuery',
        data: params
    });
}; // 支付宝查询支付结果

exports.aliUnifiedOrders = function (params) {
    return request.postRequest({
        url: 'ali/unifiedOrders',
        data: params
    });
}; // 支付宝支付

exports.disposableCancelRecharge = function (params) {
    return request.postRequest({
        url: 'disposable/cancelRecharge',
        data: params
    });
}; // 启动充电-充完即退-微信取消支付

exports.unifiedOrdersExceedMoney = function (params) {
    return request.postRequest({
        url: 'disposable/unifiedOrders/exceedMoney',
        data: params
    });
}; // 充完即退-欠款订单-预下单

exports.disposableRefund = function (params) {
    return request.postRequest({
        url: 'disposable/refund/green',
        data: params
    });
}; // 充完即退-退款

exports.queryBillInfo = function (params) {
    return request.postRequest({
        url: 'disposable/queryBillInfo',
        data: params
    });
}; // 充完即退-欠款订单-轮训充电订单信息

exports.getUserType = function () {
    return request.postRequest({
        url: 'getUserType'
    });
}; // 用户身份

exports.pageList = function (params) {
    return request.postRequest({
        url: 'pageList',
        data: params
    });
}; // 充值金额-new 2022-5-19

exports.unifiedOrders = function (params) {
    return request.postRequest({
        url: 'unifiedOrders',
        data: params
    });
}; // 充值查询-new 2022-5-19

exports.orderResultQuery = function (params) {
    return request.postRequest({
        url: 'orderResultQuery',
        data: params
    });
}; // 取消支付充值-new 2022-5-19

exports.cancelRecharge = function (params) {
    return request.postRequest({
        url: 'cancelRecharge',
        data: params
    });
}; // 充值异常配置 2022-5-20

exports.selectAbnormalConfig = function () {
    return request.postRequest({
        url: 'selectAbnormalConfig'
    });
}; //查询会员可退及不可退金额

exports.refundAmount = function () {
    return request.postRequest({
        url: 'refund/refundAmount'
    });
}; //退款或不可退列表

exports.getContent2 = function (params) {
	return request.postRequest({
		url: 'style/getContent?sonEnum='+params
	});
}; //充值说明
exports.getRechargeDiscounts = function () {
	return request.postRequest({
		url: 'getRechargeDiscounts?price='+100000
	});
}; //充值说明
exports.getRechargeAwardExplain = function (params) {
	return request.postRequest({
		url: `getRechargeAwardExplain?price=${params.balance}`,
	});
}; //充值说明

exports.refundList = function (params) {
    return request.postRequest({
        url: 'refund/refundList',
        data: params
    });
}; //已退款记录列表

exports.refundRecordList = function (params) {
    return request.postRequest({
        url: 'refund/refundRecordList',
        data: params
    });
}; //退款记录详情

exports.refundRecordById = function (params) {
    return request.postRequest({
        url: 'refund/refundRecordById',
        data: params
    });
}; //退款申请
exports.getAccountFlowDetails = function (params) {
    return request.postRequest({
        url: 'getAccountFlowDetails?id='+params.id,
	      data: params
    });
}; //充值详情

exports.refundApply = function (params) {
    return request.postRequest({
        url: 'refund/refundApply',
        data: params
    });
}; // 优惠券列表

exports.getIconTwo = function (params) {
	return request.getRequest({
		url: 'style/getIconTwo?twoEnum='+params.twoEnum+'&sellerId='+params.sellerId
	});
}; // 获取主题

exports.getMyCouponPage = function (params) {
    return request.postRequest({
        url: 'myCouponPage',
        data: params
    });
}; // 优惠券删除

exports.myCouponDelete = function (params) {
    return request.getRequest({
        url: 'myCouponDelete',
        data: params,
        header: 'form'
    });
}; // 站点收藏列表

exports.getMyCollectList = function (params) {
    return request.postRequest({
        url: 'collect/myCollectList',
        data: params
    });
}; // 获取积分规则

exports.getMemberGradeRule = function (params) {
    return request.postRequest({
        url: 'getMemberGradeRule',
        data: params,
        header: 'form'
    });
}; // 获取会员积分

exports.getIntegral = function (params) {
    return request.postRequest({
        url: 'getIntegral',
        data: params,
        header: 'form'
    });
}; // 积分列表

exports.getIntegralDetail = function (params) {
    return request.postRequest({
        url: 'integral/getDetail',
        data: params
    });
}; // 获取会员积分总数

exports.getIntegralSum = function (params) {
    return request.postRequest({
        url: 'integral/getSum',
        data: params
    });
}; //查询支付账户顺序列表

exports.queryList = function (params) {
    return request.postRequest({
        url: 'payAccountSetting/queryList',
        data: params
    });
}; //设置支付方式账户顺序

exports.batchSetting = function (params) {
    return request.postRequest({
        url: 'payAccountSetting/batchSetting',
        data: params
    });
}; // 会员等级

exports.getServicePackage = function (params) {
    return request.postRequest({
        url: 'getServicePackage',
        data: params
    });
}; // 反馈上传图片接口

exports.uploadImg = function (params) {
    return request.postRequest({
        url: 'member-service/common/upload',
        data: params
    });
}; // 站点详情反馈

exports.saveStationFeedback = function (params) {
    return request.postRequest({
        url: 'saveStationFeedback',
        data: params
    });
}; // 获取以旧带新活动

exports.getOldAndNewBenifit = function (params) {
    return request.postRequest({
        url: 'friend/getOldAndNewBenifit/' + params
    });
}; // 获取邀请好友列表


exports.getOldAndNewBenifit2 = function (params) {
    return request.postRequest({
        url: 'getOldAndNewBenifit',  
		data: params,
		header: 'form'   
    });
}; // 获取邀请好友列表

exports.getInviteMemberList = function (params) {
    return request.postRequest({
        url: 'friend/getInviteMemberList',
        data: params
    });
}; // 邀请好友

exports.getCodeAndCheckRegister = function (params) {
    return request.postRequest({
        url: 'friend/getCodeAndCheckRegister',
        data: params
    });
}; //小程序模板消息查询

exports.messagePushlist = function (params) {
    return request.postRequest({
        url: 'messagePush/list',
        data: params
    });
}; //小程序模板消息设置

exports.messagePushsetting = function (params) {
    return request.postRequest({
        url: 'messagePush/setting',
        data: params
    });
}; // 未开发票列表

exports.getUnInvoiceBillList = function (params) {
    return request.postRequest({
        url: 'invoice/getUnInvoiceBillList',
        data: params
    });
}; // 已开发票

exports.queryInvoiceRecordList = function (params) {
    return request.postRequest({
        url: 'invoice/queryInvoiceRecordList',
        data: params
    });
}; //获取发票抬头信息

exports.getBySellerId = function (params) {
    return request.postRequest({
        url: 'invoice/getBySellerId/' + params
    });
}; // 发票申请

exports.applyInvoice = function (params) {
    return request.postRequest({
        url: 'invoice/applyInvoice',
        data: params
    });
}; // 发票详情

exports.queryInvoiceDetailById = function (params) {
    return request.postRequest({
        url: 'invoice/queryInvoiceDetailById/' + params
    });
}; // 查询发票订单信息列表

exports.getInvoiceBillList = function (params) {
    return request.postRequest({
        url: 'invoice/getInvoiceBillList',
        data: params
    });
}; // 获取帮助中心数据

exports.getHelpExampleDate = function (params) {
    return request.postRequest({
        url: 'getHelpExampleDate',
        data: params
    });
}; // 获取客服反馈字典

exports.getFeedbackDict = function (params) {
    return request.postRequest({
        url: 'getFeedbackDict',
        data: params
    });
}; // 客服新增个人反馈


exports.addMyFeedback = function (params) {
    return request.postRequest({
        url: 'addMyFeedback',
        data: params
    });
}; // 客服我的反馈列表

exports.getMyFeedbackList = function (params) {
    return request.postRequest({
        url: 'getMyFeedbackList/',
        data: params
    });
}; // 客服我的反馈数据详情

exports.getMyFeedbackDetails = function (id) {
    return request.getRequest({
        url: 'getMyFeedbackDetails/',
        data: {
            id: id
        }
    });
};
// 客服阅读数
exports.addReadingQuantity = function(params) {
    return request.getRequest({
        url: 'addReadingQuantity?id='+ params
    });
};
/***** 终端部分******/
// 获取终端桩详情

exports.getPileDTOByNo = function (params) {
    return request.postRequest({
        url: 'getPileDTOByNo',
        data: params,
        header: 'form'
    });
}; // 查看枪阶段价格详情

exports.queryElectPriceDatil = function (params) {
    return request.postRequest({
        url: 'queryElectPriceDatil',
        data: params,
        header: 'form'
    });
}; // 订单列表

exports.myBillPage = function (params) {
    return request.postRequest({
        url: 'myBillPage',
        data: params
    });
}; // 订单详情

exports.myBillDetails = function (params) {
    return request.getRequest({
        url: 'myBillDetails',
        data: params
    });
}; // 启动充电鉴权

exports.startCharge = function (params) {
    return request.postRequest({
        url: 'charge/startCharge',
        data: params,
        tips:true
    });
}; // 重新启动充电

exports.unFrozenAccount = function (params) {
    return request.postRequest({
        url: 'unFrozenAccount',
		header: 'form',
        data: params
    });
}; // 校验最低充值金额

exports.getMinimumStartBalance = function () {
    return request.postRequest({
        url: 'getMinimumStartBalance'
    });
};

exports.queryIsChargeByBusId = function (params) {
    return request.postRequest({
        url: 'queryIsChargeByBusId',
        header: 'form',
        data: params
    });
}; // 充电详情


// enableCancel 是否可取消接口
exports.querChargeOnline = function (params, enableCancel = false) {
    return request.postRequest({
        url: 'querChargeOnline',
        header: 'form',
        data: params,
        tips:true,
        enableCancel
    });
};
/***** 扫码充电******/
//后台解析

exports.parseCode = function (params) {
    return request.postRequest({
        url: 'parseCode',
        data: params
    });
}; 
//后台解析--国网、能瑞
exports.queryQrcodeData = function (params){
    return request.postRequest({
        url: 'queryQrcodeData',
        header: 'form',
        data: params
    })
}

// 扫码和输入终端号之前判断是否在充电
exports.querMemberStatus = function () {
    return request.postRequest({
        url: 'querMemberStatus'
    });
}; // 停止充电

exports.stopCharge = function (params) {
    return request.postRequest({
        url: 'stopCharge',
        header: 'form',
        data: params
    });
}; // 充电公告

exports.advertisingGeneralQuery = function (params) {
    return request.postRequest({
        url: 'advertisingGeneralQuery',
        data: params,
        header: 'form'
    });
};
/***** 订单结算******/
//获取未结算订单

exports.getDelayPayBill = function (params) {
    return request.postRequest({
        url: 'getDelayPayBill',
        data: params
    });
}; 
//充电扣款-确认支付
exports.delayDeductionCharge = function (params) {
    return request.postRequest({
        url: 'delayDeductionCharge',
        data: params
    });
};
//充电扣款-确认支付-电卡支付
exports.delaydeductionBill = function (params) {
    return marketingRequest.postRequest({
        url: 'bill-service/bill/deductionBill',
        data: params
    });
}; 
//获取优惠券列表
exports.getCouponRecodeByBill = function (params) {
    return request.postRequest({
        url: 'getCouponRecodeByBill',
        data: params
    });
}; //获取可用奖励金抵扣金额

exports.getDeductibleBalance = function (params) {
    return request.postRequest({
        url: 'getDeductibleBalance',
        data: params
    });
}; //桩枪是否可以充电

exports.querChargeRealy = function (params) {
    return request.postRequest({
        url: 'querChargeRealy',
        data: params,
        header: 'form'
    });
};
/***** 我的账单******/

// 放电近半年消费对比-#V2G功能
exports.queryTopMonthDisChargeBillReportList = function (params) {
    return request.postRequest({
        url: '/myReportBill/queryTopMonthDisChargeBillReportList',
        data: params
    });
};


//合计

exports.queryTopMonthBillReportList = function (params) {
    return request.postRequest({
        url: '/myReportBill/queryTopMonthBillReportList',
        data: params
    });
}; //常去的充电站top3

exports.qeuryStationReportByMonth = function (params) {
    return request.postRequest({
        url: '/myReportBill/qeuryStationReportByMonth',
        data: params
    });
}; //月年账单

exports.queryBillReportByMember = function (params) {
    return request.postRequest({
        url: '/myReportBill/queryBillReportByMonth',
        data: params
    });
};

// 说明
exports.getContent = function (params) {
    return request.postRequest({
        url: 'style/getContent',
        data: params,
		header: 'form'
    });
};

// 充电中电流功率图表
exports.doGetMonitorDetailPower = function (params) {
    return request.postRequest({
        url: '/charge/doGetMonitorDetailPower',
        urlType:true,
        data: params,
        header: 'form',
        tips:true
    });
};

//获取个人资料
exports.getMemberPersonalData = function (params) {
    return request.postRequest({
        url: '/getMemberPersonalData',
        data: params
    });
};

//修改个人资料
exports.updateMemberPersonalData = function (params) {
    return request.postRequest({
        url: '/updateMemberPersonalData',
        data: params
    });
};

//获取城市list
exports.getAreaTree = function () {
    return request.postRequest({
        url: '/getAreaTree',
		urlType:true,
    });
};

// 获取移动端配置
exports.getSellerBasicsConfig = function (data) {
    return request.postRequest({
        url: 'style/getSellerBasicsConfig',
		data,
        header: 'form'
    });
};

//工行聚合支付
exports.icbcJftUnifiedOrder = function (data) {
    return request.postRequest({
        url: 'icbcJft/icbcJftUnifiedOrder',
		data,
    });
};






//获取发票默认信息
exports.queryInvoiceRecently = function (params) {
    return request.postRequest({
        url: 'invoice/queryInvoiceRecently',
        data: params
    });
};


//公告

exports.queryNewMessageNotAuth = function (params) {
    return request.postRequest({
        url: 'message/queryNewMessageNotAuth',
        data: params
    });
}; 



// 获取城市经纬度
exports.getAreaById = function (data) {
    return request.postRequest({
        url: 'getAreaById',
        data,
        header: 'form'
    });
};




// 移动端优化

// 获取站点枪状态
exports.getStationGunList = function (params) {
	return request.postRequest({
		url: 'getStationGunList',
        data: params,
	});
}; 

// 获取站点枪状态
exports.getStationGunState = function (params) {
	return request.postRequest({
		url: 'getStationGunState',
        data: params,
	});
}; 


// 获取枪详情数据
exports.getStationGunDetails = function (params) {
	return request.postRequest({
		url: 'getStationGunDetails',
        data: {
            gunId: params,
        },
	});
}; 


// 831加 获取枪详情数据 未登录
exports.getStationGunDetailsNotAuth = function (params) {
	return request.postRequest({
		url: 'getStationGunDetailsNotAuth',
        data: {
            gunId: params,
        },
	});
}; 



// 获取终端桩详情
exports.getPileDTOByNo = function (params) {
    return request.postRequest({
        url: 'getPileDTOByNo',
        data: params,
        header: 'form'
    });
};



// 移动端优化登录整改
//登录前检查-用于授权登录 - 小程序优化
exports.loginBeforeCheck = function (data) {
    return request.postRequest({
        url: 'loginBeforeCheck',
		data,
    });
};

//登录或注册-用于授权登录 - 小程序优化
exports.loginAndRegister = function (data) {
    return request.postRequest({
        url: 'loginAndRegister',
		data,
    });
};

//登录-仅在提示您的手机号码已关联其他微信账号，是否继续使用该手机号码登录 调用 - 小程序优化
exports.loginOther = function (data) {
    return request.postRequest({
        url: 'loginOther',
		data,
    });
};

//登录-验证码登录 - 小程序优化
exports.loginAndRegisterByCode = function (data) {
    return request.postRequest({
        url: 'loginAndRegisterByCode',
		data,
    });
};

// 碧合支付-调起支付接口   
exports.bhPayUnifiedOrder = function (params) {
    return request.postRequest({
        url: 'bhPay/bhPayUnifiedOrder',
        data: params
    });
}

// 碧合支付-取消支付
exports.bhPayCancelRecharge = function (params) {
    return request.postRequest({
        url: 'bhPay/bhPayCancelRecharge',
        data: params
    });
}; 

// 碧合支付-支付成功主动查询接口
exports.bhPayOrderQuery = function (params) {
    return request.postRequest({
        url: 'bhPay/bhPayOrderQuery',
        data: params,
		header: 'form',
    });
};


// 农行支付-调起支付接口   
exports.ABCPayUnifiedOrders = function (params) {
    return request.postRequest({
        url: 'ABCPay/unifiedOrders',
        data: params
    });
}


// 农行支付-支付成功主动查询接口
exports.ABCPayOrderQuery = function (params) {
    return request.postRequest({
        url: 'ABCPay/orderQuery',
        data: params,
    });
};


// 营销获客开通会员
exports.purchaseMembe = (params) => {
    return request.postRequest({
        url: 'purchaseMember',
        data: params
    });
};

// 平台会员删除
exports.delMember = () => {
    return request.postRequest({
        url: '/member/del'
    });
};


// 巨湾润云规则解析
exports.getGunDTOByConnectorId = (connectorId) => {
    return request.postRequest({
        url: `/gun/getGunDTOByConnectorId?connectorId=${connectorId}`
    });
};

// 获取公众号配置
exports.getH5Config = (data) => {
    return request.postRequest({
        url: `getConfig`,
        data,
		header:'form'
    });
};

// 获取商家appid
exports.getSerllerConfig = (data) => {
    return request.postRequest({
        url: `getSerllerConfig`,
        data,
		header:'form'
    });
};

// 通过code获取openid
exports.wxcallback = (data) => {
    return request.postRequest({
        url: `wxcallback`,
        data,
		header:'form'
    });
};

// 农行支付
exports.nongShangHangPay = (data) => {
    return request.postRequest({
        url: `nongShangHangPay`,
        data,
    });
};

// 获取微信token
exports.getWxToken = (data) => {
    return request.postRequest({
        url: `getWxToken`,
        data,
    });
};


// 招商局支付下单
exports.CMPayUnifiedOrder = function (params) {
    return request.postRequest({
        url: 'CMPay/unifiedOrder',
        data: params
    });
}; 

// 招商局支付轮询
exports.CMPayOrderQuery = function (params) {
    return request.postRequest({
        url: 'CMPay/orderQuery',
        data: params
    });
}; 

// 招商局支付取消
exports.CMPayCancelRecharge = function (params) {
    return request.postRequest({
        url: 'CMPay/cancelRecharge',
        data: params
    });
}; 

// 招商局登录
exports.ZSJH5Login = function (params) {
	// ?token=${params.data}&sellerNo=${params.sellerNo}
    return request.postRequest({
        url: `ZSJH5Login`,
		header: 'form',
        data: params
    });
}; 

// 成都公交-H5登录
exports.CDGJH5Login = function (params) {
    return request.postRequest({
        url: `CDGJH5Login`,
		header: 'form',
        data: params
    });
}; 


// v2g启动放电-#V2G功能
exports.v2gStartDisCharge = function (params) {
	return request.postRequest({
			url: 'startDisCharge',
			data: params,
			header:'form'
	});
}; 

// v2g停止放电-#V2G功能
exports.v2gStopDisCharge = function (params) {
	return request.postRequest({
			url: 'stopDisCharge',
			data: params,
			header:'form'
	});
}; 

// 获取我的IP
exports.getMemberAddr = function () {
    return request.postRequest({
        url: 'getMemberAddr'
    });
};

// 获取广告
exports.getAdvertise = function (params) {
    return request.postRequest({
        url: 'getAdvertise',
        data: params
    });
};
